﻿import request from '/@/utils/request';

enum Api {
  AddPatCell = '/api/patCell/add',
  DeletePatCell = '/api/patCell/delete',
  UpdatePatCell = '/api/patCell/update',
  GetPatCellPage = '/api/patCell/page',
  RemoteCell='/api/patCell/remotecell',
  PatToFms='/api/patCell/pattofms',
  Upload='/api/patCell/upload',
  Template='/api/patCell/template',
  Export='/api/patCell/Export'
}

// 增加PatCellService
export const addPatCell = (params?: any) =>
	request({
		url: Api.AddPatCell,
		method: 'post',
		data: params,
	});

// 删除PatCellService
export const deletePatCell = (params?: any) => 
	request({
			url: Api.DeletePatCell,
			method: 'post',
			data: params,
		});

// 编辑PatCellService
export const updatePatCell = (params?: any) => 
	request({
			url: Api.UpdatePatCell,
			method: 'post',
			data: params,
		});

// 分页查询PatCellService
export const getPatCellPageList = (params?: any) => 
	request({
			url: Api.GetPatCellPage,
			method: 'get',
			data: params,
		});

// 推送获取远程的组装电芯数据
export const PushRemoteCell = (params?: any) => 
	request({
			url: Api.RemoteCell,
			method: 'post',
			data: params,
		});
// 推送数据到FMS
export const PushToFms = () =>
	request({
		url: Api.PatToFms,
		method: 'get'

	});
	
// 下载模板
export const Template = () =>
	request({
		url: Api.Template,
		method: 'get'

	});
// 上传数据
export const Upload = (params?:any) =>
request({
	url: Api.Upload,
	method: 'post',
	data:params,
	headers: {  "Content-Type": "multipart/form-data" }

});

// 导出数据
export const ExportData = () =>
request({
	url: Api.Export,
	method: 'get',
	

});



